package com.wzj.manage.controller;


import com.wzj.manage.service.SignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wzj
 * @since 2021-04-12
 */
@Controller
@RequestMapping("/sign")
public class SignController {
    @Autowired
    public SignService signService;


    @RequestMapping("/signlist")
    @ResponseBody
    public List<Map> signlist(){
        List<Map> maps = signService.selectSign();
        System.out.println(maps);
        return maps;
    }
    @RequestMapping("/signlist2")
    @ResponseBody
    public List<Map> signlist2(@RequestParam("signstatus")  int status){
        List<Map> maps = new ArrayList<Map>();
        if(status!=4) maps=signService.findStatus(status);
        else maps=signService.selectSign();
        System.out.println(maps);
        return maps;
    }
}

